import axios, {ResDataType} from "./ajax";

export async function getQuestionStatListService(questionId: string, opt: { page: number; pageSize: number }) {
    const url = `/api/stat/${questionId}`;
    return (await axios.get(url, {params: opt})) as ResDataType
}


export async function getComponentStatService(questionId: string, componentId: string) {
    const url = `/api/stat/${questionId}/${componentId}`;
    return (await axios.get(url)) as ResDataType
}